package com.qianli.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.qianli.dao.GroupDao;
import com.qianli.dao.UserDao;
import com.qianli.pojo.Group;
import com.qianli.pojo.User;

@Transactional
public class GroupService{
	private GroupDao groupDao;
	
	public void save(Group group){
		groupDao.save(group);	
	}
	public List<Group> showGroup(){
		return groupDao.findAll();
	}   
	public void del(String id){
		groupDao.del(id);
	} 
	
	public void editGroup(String id,String name){
		
		  groupDao.update(id, name);
		
	
	}  
	
	public Group findById(String id){
		return groupDao.findByUnique("id",id);
		
	}
	public List<Group> findAll() {
		
		return groupDao.findAll();
	}
	
	public void setGroupDao(GroupDao groupDao) {
		this.groupDao = groupDao;
	}
	
	

}
